using System.Linq;
using System.Text;
using System.Diagnostics;
using System.Runtime.Serialization;
using System.Collections;
using System.Data;
using System.ComponentModel;
using System.Data.OracleClient;
using WPFExcelReport.Helpers;
using WPFExcelReport.Controls;
namespace WPFExcelReport
{
    public partial class VPROFDEF
    {
        public DataRow Convert2PROFDEF(DataRow dwInput, string ITXDBVERSION, bool IsConvert = false)
        {
            DataSet SResult = new DataSet();
            SResult = QueryPROFDEF(dwInput, 0);
            DataRow dwReturn = null;
            if (SResult.Tables[0].Rows.Count > 0)
            {
                dwReturn = SResult.Tables[0].Rows[0];
            }
            else
            {
                dwReturn = SResult.Tables[0].NewRow();
            }
            switch (ITXDBVERSION)
            {
                case "YGR":
                    #region=========
         dwReturn["PDMANDANT"] = " ".PadRight(2 ); 
         dwReturn["PDPROFIL"] = " ".PadRight(8 ); 
         dwReturn["PDPROG"] = " ".PadRight(8 ); 
         dwReturn["PDFDNAM"] = " ".PadRight(8 ); 
         dwReturn["PDGRP"] = " ".PadRight(1 ); 
         dwReturn["PDPANZ"] = " ".PadRight(0 ); 
         dwReturn["PDNEUBEN"] = " ".PadRight(8 ); 
         dwReturn["PDNEUDAT"] = " ".PadRight(0 ); 
         dwReturn["PDAENDBEN"] = " ".PadRight(8 ); 
         dwReturn["PDAENDDAT"] = " ".PadRight(0 ); 
         dwReturn["PDAENDZL"] = " ".PadRight(0 ); 
         dwReturn["PDPART1"] = " ".PadRight(1 ); 
         dwReturn["PDWERT1"] = " ".PadRight(6 ); 
         dwReturn["PDPART2"] = " ".PadRight(1 ); 
         dwReturn["PDWERT2"] = " ".PadRight(6 ); 
         dwReturn["PDPART3"] = " ".PadRight(1 ); 
         dwReturn["PDWERT3"] = " ".PadRight(6 ); 
         dwReturn["PDPART4"] = " ".PadRight(1 ); 
         dwReturn["PDWERT4"] = " ".PadRight(6 ); 
         dwReturn["PDPART5"] = " ".PadRight(1 ); 
         dwReturn["PDWERT5"] = " ".PadRight(6 ); 
         dwReturn["PDPART6"] = " ".PadRight(1 ); 
         dwReturn["PDWERT6"] = " ".PadRight(6 ); 
         dwReturn["PDPART7"] = " ".PadRight(1 ); 
         dwReturn["PDWERT7"] = " ".PadRight(6 ); 
         dwReturn["PDPART8"] = " ".PadRight(1 ); 
         dwReturn["PDWERT8"] = " ".PadRight(6 ); 
         dwReturn["PDPART9"] = " ".PadRight(1 ); 
         dwReturn["PDWERT9"] = " ".PadRight(6 ); 
         dwReturn["PDPART10"] = " ".PadRight(1 ); 
         dwReturn["PDWERT10"] = " ".PadRight(6 ); 
         dwReturn["PDPART11"] = " ".PadRight(1 ); 
         dwReturn["PDWERT11"] = " ".PadRight(6 ); 
         dwReturn["PDPART12"] = " ".PadRight(1 ); 
         dwReturn["PDWERT12"] = " ".PadRight(6 ); 
         dwReturn["PDPART13"] = " ".PadRight(1 ); 
         dwReturn["PDWERT13"] = " ".PadRight(6 ); 
         dwReturn["PDPART14"] = " ".PadRight(1 ); 
         dwReturn["PDWERT14"] = " ".PadRight(6 ); 
         dwReturn["PDPART15"] = " ".PadRight(1 ); 
         dwReturn["PDWERT15"] = " ".PadRight(6 ); 
         dwReturn["PDPART16"] = " ".PadRight(1 ); 
         dwReturn["PDWERT16"] = " ".PadRight(6 ); 
         dwReturn["PDPART17"] = " ".PadRight(1 ); 
         dwReturn["PDWERT17"] = " ".PadRight(6 ); 
         dwReturn["PDPART18"] = " ".PadRight(1 ); 
         dwReturn["PDWERT18"] = " ".PadRight(6 ); 
         dwReturn["PDPART19"] = " ".PadRight(1 ); 
         dwReturn["PDWERT19"] = " ".PadRight(6 ); 
         dwReturn["PDPART20"] = " ".PadRight(1 ); 
         dwReturn["PDWERT20"] = " ".PadRight(6 ); 
         dwReturn["PDPART21"] = " ".PadRight(1 ); 
         dwReturn["PDWERT21"] = " ".PadRight(6 ); 
         dwReturn["PDPART22"] = " ".PadRight(1 ); 
         dwReturn["PDWERT22"] = " ".PadRight(6 ); 
         dwReturn["PDPART23"] = " ".PadRight(1 ); 
         dwReturn["PDWERT23"] = " ".PadRight(6 ); 
         dwReturn["PDPART24"] = " ".PadRight(1 ); 
         dwReturn["PDWERT24"] = " ".PadRight(6 ); 
         dwReturn["PDPART25"] = " ".PadRight(1 ); 
         dwReturn["PDWERT25"] = " ".PadRight(6 ); 
         dwReturn["PDPART26"] = " ".PadRight(1 ); 
         dwReturn["PDWERT26"] = " ".PadRight(6 ); 
         dwReturn["PDPART27"] = " ".PadRight(1 ); 
         dwReturn["PDWERT27"] = " ".PadRight(6 ); 
         dwReturn["PDPART28"] = " ".PadRight(1 ); 
         dwReturn["PDWERT28"] = " ".PadRight(6 ); 
         dwReturn["PDPART29"] = " ".PadRight(1 ); 
         dwReturn["PDWERT29"] = " ".PadRight(6 ); 
         dwReturn["PDPART30"] = " ".PadRight(1 ); 
         dwReturn["PDWERT30"] = " ".PadRight(6 ); 
         dwReturn["PDPART31"] = " ".PadRight(1 ); 
         dwReturn["PDWERT31"] = " ".PadRight(6 ); 
         dwReturn["PDPART32"] = " ".PadRight(1 ); 
         dwReturn["PDWERT32"] = " ".PadRight(6 ); 
         dwReturn["PDPART33"] = " ".PadRight(1 ); 
         dwReturn["PDWERT33"] = " ".PadRight(6 ); 
         dwReturn["PDPART34"] = " ".PadRight(1 ); 
         dwReturn["PDWERT34"] = " ".PadRight(6 ); 
         dwReturn["PDPART35"] = " ".PadRight(1 ); 
         dwReturn["PDWERT35"] = " ".PadRight(6 ); 
         dwReturn["PDPART36"] = " ".PadRight(1 ); 
         dwReturn["PDWERT36"] = " ".PadRight(6 ); 
         dwReturn["PDPART37"] = " ".PadRight(1 ); 
         dwReturn["PDWERT37"] = " ".PadRight(6 ); 
         dwReturn["PDPART38"] = " ".PadRight(1 ); 
         dwReturn["PDWERT38"] = " ".PadRight(6 ); 
         dwReturn["PDPART39"] = " ".PadRight(1 ); 
         dwReturn["PDWERT39"] = " ".PadRight(6 ); 
         dwReturn["PDPART40"] = " ".PadRight(1 ); 
         dwReturn["PDWERT40"] = " ".PadRight(6 ); 
         dwReturn["PDFILLER"] = " ".PadRight(15 ); 
                    #endregion
                    break;
                case "JLT":

                    break;
                default:

                    break;
            }
            if (IsConvert)
            {
                foreach (DataColumn cm in dwInput.Table.Columns)
                {
                    if (dwInput[cm.ColumnName].ToString() == "")
                        continue;
                    if (dwReturn.Table.Columns.Contains(cm.ColumnName))
                    {
                        dwReturn[cm.ColumnName] = dwInput[cm.ColumnName];
                    }
                }
            }
            return dwReturn;
        }
        public void MapPROFDEF(ref DataRow dwLocal, DataRow dwData)
        {
            BlindMap(ref dwLocal, dwData);
        }
        public void SavePROFDEF(DataRow dwData, string ITXDBVERSION = "50.24")
        {
            DataSet setResult = new DataSet();
            DataTable tbLocal = null;
            DataRow dwLocal = null;
            bool flgExist = false;
            setResult = QueryPROFDEF(dwData);
            if (setResult.Tables.Count > 0)
            {
                tbLocal = setResult.Tables[0];
                if (tbLocal.Rows.Count > 0)
                {
                    flgExist = true;
                    dwLocal = tbLocal.Rows[0];
                }
                else
                {
                    dwLocal = tbLocal.NewRow();
                }
            }
            MapPROFDEF(ref dwLocal, dwData);

            if (!flgExist)
            {

                InsertPROFDEF(dwLocal, ITXDBVERSION);
            }
            UpdatePROFDEF(dwLocal);
        }
        public void InsertPROFDEF(DataRow dwData, string ITXDBVERSION = "50.24")
        {
            OracleCommand or1;
            or1 = OracleDB.CreateCommand();
            switch (ITXDBVERSION)
            {
                case "YGR":
                    or1.CommandText = "INSERT INTO PROFDEF(VAKBMANDANT, VAKBKOLL, VAKBART, VAKBKUNDNR, VAKBFARBE, VAKBKDARTNR, VAKBKDARTBEZ, VAKBKDFARBNR, VAKBANDRUCK, VAKBMEGEW, VAKBMENGEH, VAKBGEWVON, VAKBGEWBIS, VAKBGEWCA, VAKBGEWFKT, VAKBGEWGRP, VAKBMEGFKT, VAKBMEGGRP, VAKBAENDZL, VAKBAENDBEN, VAKBAENDDAT, VAKBNEUBEN, VAKBNEUDAT, VAKBFILLER)"
                        + " VALUES (:VAKBMANDANT, :VAKBKOLL, :VAKBART, :VAKBKUNDNR, :VAKBFARBE, '                         ', '                         ', '                             ', ' ', '   ', '   ', 0, 0, ' ', '000000000000', ' ', '000000000000', ' ', 0, '        ', '000000', '        ', '      ', '                                          ')";
                    or1.Parameters.Add("VAKBMANDANT", OracleType.NVarChar).Value = dwData["VAKBMANDANT"].ToString();
                    or1.Parameters.Add("VAKBKOLL", OracleType.NVarChar).Value = dwData["VAKBKOLL"].ToString();
                    or1.Parameters.Add("VAKBART", OracleType.NVarChar).Value = dwData["VAKBART"].ToString();
                    or1.Parameters.Add("VAKBFARBE", OracleType.NVarChar).Value = dwData["VAKBFARBE"].ToString();
                    or1.Parameters.Add("VAKBKUNDNR", OracleType.NVarChar).Value = dwData["VAKBKUNDNR"].ToString();
                    break;
                //VAFMANDANT VAFKOLL VAFART VAFFARBE VAFBEZ VAFFFARBE

            }
            
            Connect2Proxy(or1);
        }
        public DataSet QueryPROFDEF(DataRow dwData, int option = 1)
        {
            DataSet Return;
            DataSet Result = new DataSet();
            OracleCommand or1 = OracleDB.CreateCommand();
            switch (option)
            {
                case 0:
                    or1.CommandText = "SELECT * FROM PROFDEF WHERE  ROWNUM<2 ";
                    break;
              
                case 99:
                    or1.CommandText = "SELECT * FROM PROFDEF  WHERE ROWNUM<50";
                    break;
                default:
                    break;
            }
            Result = Connect2Proxy(or1);
            if (Result.Tables.Count > 0)
                Result.Tables[0].TableName = "PROFDEF";
            Return = Result;
            return Return;
        }
        public void DeletePROFDEF(DataRow dwData, int option = 1)
        {

            OracleCommand or1 = OracleDB.CreateCommand();
            switch (option)
            {
                case 1:
                    or1.CommandText = "DELETE FROM PROFDEF   WHERE  VAKBMANDANT=:VAKBMANDANT AND VAKBKOLL=:VAKBKOLL AND VAKBART =:VAKBART AND VAKBFARBE=:VAKBFARBE AND VAKBKUNDNR=:VAKBKUNDNR";
                     or1.Parameters.Add("VAKBMANDANT", OracleType.NVarChar).Value = dwData["VAKBMANDANT"].ToString();
                    or1.Parameters.Add("VAKBKOLL", OracleType.NVarChar).Value = dwData["VAKBKOLL"].ToString();
                    or1.Parameters.Add("VAKBART", OracleType.NVarChar).Value = dwData["VAKBART"].ToString();
                    or1.Parameters.Add("VAKBFARBE", OracleType.NVarChar).Value = dwData["VAKBFARBE"].ToString();
                    or1.Parameters.Add("VAKBKUNDNR", OracleType.NVarChar).Value = dwData["VAKBKUNDNR"].ToString();
                    break;
                default:
                    break;
            }
            Connect2Proxy(or1);
        } 
      
        public void UpdatePROFDEF(DataRow dwData, string ITXDBVERSION = "50.24", int option = 1)
        {
            OracleCommand or1;
            DataSet Result = new DataSet();
            or1 = OracleDB.CreateCommand();
            switch (option)
            {
                case 1:
                    #region====Command==== 
                    or1.CommandText = "UPDATE PROFDEF SET "
                    +"PDMANDANT= :PDMANDANT,"
                    +"PDPROFIL= :PDPROFIL,"
                    +"PDPROG= :PDPROG,"
                    +"PDFDNAM= :PDFDNAM,"
                    +"PDGRP= :PDGRP,"
                    +"PDPANZ= :PDPANZ,"
                    +"PDNEUBEN= :PDNEUBEN,"
                    +"PDNEUDAT= :PDNEUDAT,"
                    +"PDAENDBEN= :PDAENDBEN,"
                    +"PDAENDDAT= :PDAENDDAT,"
                    +"PDAENDZL= :PDAENDZL,"
                    +"PDPART1= :PDPART1,"
                    +"PDWERT1= :PDWERT1,"
                    +"PDPART2= :PDPART2,"
                    +"PDWERT2= :PDWERT2,"
                    +"PDPART3= :PDPART3,"
                    +"PDWERT3= :PDWERT3,"
                    +"PDPART4= :PDPART4,"
                    +"PDWERT4= :PDWERT4,"
                    +"PDPART5= :PDPART5,"
                    +"PDWERT5= :PDWERT5,"
                    +"PDPART6= :PDPART6,"
                    +"PDWERT6= :PDWERT6,"
                    +"PDPART7= :PDPART7,"
                    +"PDWERT7= :PDWERT7,"
                    +"PDPART8= :PDPART8,"
                    +"PDWERT8= :PDWERT8,"
                    +"PDPART9= :PDPART9,"
                    +"PDWERT9= :PDWERT9,"
                    +"PDPART10= :PDPART10,"
                    +"PDWERT10= :PDWERT10,"
                    +"PDPART11= :PDPART11,"
                    +"PDWERT11= :PDWERT11,"
                    +"PDPART12= :PDPART12,"
                    +"PDWERT12= :PDWERT12,"
                    +"PDPART13= :PDPART13,"
                    +"PDWERT13= :PDWERT13,"
                    +"PDPART14= :PDPART14,"
                    +"PDWERT14= :PDWERT14,"
                    +"PDPART15= :PDPART15,"
                    +"PDWERT15= :PDWERT15,"
                    +"PDPART16= :PDPART16,"
                    +"PDWERT16= :PDWERT16,"
                    +"PDPART17= :PDPART17,"
                    +"PDWERT17= :PDWERT17,"
                    +"PDPART18= :PDPART18,"
                    +"PDWERT18= :PDWERT18,"
                    +"PDPART19= :PDPART19,"
                    +"PDWERT19= :PDWERT19,"
                    +"PDPART20= :PDPART20,"
                    +"PDWERT20= :PDWERT20,"
                    +"PDPART21= :PDPART21,"
                    +"PDWERT21= :PDWERT21,"
                    +"PDPART22= :PDPART22,"
                    +"PDWERT22= :PDWERT22,"
                    +"PDPART23= :PDPART23,"
                    +"PDWERT23= :PDWERT23,"
                    +"PDPART24= :PDPART24,"
                    +"PDWERT24= :PDWERT24,"
                    +"PDPART25= :PDPART25,"
                    +"PDWERT25= :PDWERT25,"
                    +"PDPART26= :PDPART26,"
                    +"PDWERT26= :PDWERT26,"
                    +"PDPART27= :PDPART27,"
                    +"PDWERT27= :PDWERT27,"
                    +"PDPART28= :PDPART28,"
                    +"PDWERT28= :PDWERT28,"
                    +"PDPART29= :PDPART29,"
                    +"PDWERT29= :PDWERT29,"
                    +"PDPART30= :PDPART30,"
                    +"PDWERT30= :PDWERT30,"
                    +"PDPART31= :PDPART31,"
                    +"PDWERT31= :PDWERT31,"
                    +"PDPART32= :PDPART32,"
                    +"PDWERT32= :PDWERT32,"
                    +"PDPART33= :PDPART33,"
                    +"PDWERT33= :PDWERT33,"
                    +"PDPART34= :PDPART34,"
                    +"PDWERT34= :PDWERT34,"
                    +"PDPART35= :PDPART35,"
                    +"PDWERT35= :PDWERT35,"
                    +"PDPART36= :PDPART36,"
                    +"PDWERT36= :PDWERT36,"
                    +"PDPART37= :PDPART37,"
                    +"PDWERT37= :PDWERT37,"
                    +"PDPART38= :PDPART38,"
                    +"PDWERT38= :PDWERT38,"
                    +"PDPART39= :PDPART39,"
                    +"PDWERT39= :PDWERT39,"
                    +"PDPART40= :PDPART40,"
                    +"PDWERT40= :PDWERT40,"
                    +"PDFILLER= :PDFILLER,"
                        + " WHERE  "
                        + "  VAKBMANDANT=:VAKBMANDANT AND VAKBKOLL=:VAKBKOLL AND VAKBART =:VAKBART AND VAKBFARBE=:VAKBFARBE AND VAKBKUNDNR=:VAKBKUNDNR";
                    #endregion

                    #region====Parameters====
          or1.Parameters.Add("PDMANDANT", OracleType.NVarChar).Value = dwData["PDMANDANT"].ToString(); 
          or1.Parameters.Add("PDPROFIL", OracleType.NVarChar).Value = dwData["PDPROFIL"].ToString(); 
          or1.Parameters.Add("PDPROG", OracleType.NVarChar).Value = dwData["PDPROG"].ToString(); 
          or1.Parameters.Add("PDFDNAM", OracleType.NVarChar).Value = dwData["PDFDNAM"].ToString(); 
          or1.Parameters.Add("PDGRP", OracleType.NVarChar).Value = dwData["PDGRP"].ToString(); 
          or1.Parameters.Add("PDPANZ", OracleType.NVarChar).Value = dwData["PDPANZ"].ToString(); 
          or1.Parameters.Add("PDNEUBEN", OracleType.NVarChar).Value = dwData["PDNEUBEN"].ToString(); 
          or1.Parameters.Add("PDNEUDAT", OracleType.NVarChar).Value = dwData["PDNEUDAT"].ToString(); 
          or1.Parameters.Add("PDAENDBEN", OracleType.NVarChar).Value = dwData["PDAENDBEN"].ToString(); 
          or1.Parameters.Add("PDAENDDAT", OracleType.NVarChar).Value = dwData["PDAENDDAT"].ToString(); 
          or1.Parameters.Add("PDAENDZL", OracleType.NVarChar).Value = dwData["PDAENDZL"].ToString(); 
          or1.Parameters.Add("PDPART1", OracleType.NVarChar).Value = dwData["PDPART1"].ToString(); 
          or1.Parameters.Add("PDWERT1", OracleType.NVarChar).Value = dwData["PDWERT1"].ToString(); 
          or1.Parameters.Add("PDPART2", OracleType.NVarChar).Value = dwData["PDPART2"].ToString(); 
          or1.Parameters.Add("PDWERT2", OracleType.NVarChar).Value = dwData["PDWERT2"].ToString(); 
          or1.Parameters.Add("PDPART3", OracleType.NVarChar).Value = dwData["PDPART3"].ToString(); 
          or1.Parameters.Add("PDWERT3", OracleType.NVarChar).Value = dwData["PDWERT3"].ToString(); 
          or1.Parameters.Add("PDPART4", OracleType.NVarChar).Value = dwData["PDPART4"].ToString(); 
          or1.Parameters.Add("PDWERT4", OracleType.NVarChar).Value = dwData["PDWERT4"].ToString(); 
          or1.Parameters.Add("PDPART5", OracleType.NVarChar).Value = dwData["PDPART5"].ToString(); 
          or1.Parameters.Add("PDWERT5", OracleType.NVarChar).Value = dwData["PDWERT5"].ToString(); 
          or1.Parameters.Add("PDPART6", OracleType.NVarChar).Value = dwData["PDPART6"].ToString(); 
          or1.Parameters.Add("PDWERT6", OracleType.NVarChar).Value = dwData["PDWERT6"].ToString(); 
          or1.Parameters.Add("PDPART7", OracleType.NVarChar).Value = dwData["PDPART7"].ToString(); 
          or1.Parameters.Add("PDWERT7", OracleType.NVarChar).Value = dwData["PDWERT7"].ToString(); 
          or1.Parameters.Add("PDPART8", OracleType.NVarChar).Value = dwData["PDPART8"].ToString(); 
          or1.Parameters.Add("PDWERT8", OracleType.NVarChar).Value = dwData["PDWERT8"].ToString(); 
          or1.Parameters.Add("PDPART9", OracleType.NVarChar).Value = dwData["PDPART9"].ToString(); 
          or1.Parameters.Add("PDWERT9", OracleType.NVarChar).Value = dwData["PDWERT9"].ToString(); 
          or1.Parameters.Add("PDPART10", OracleType.NVarChar).Value = dwData["PDPART10"].ToString(); 
          or1.Parameters.Add("PDWERT10", OracleType.NVarChar).Value = dwData["PDWERT10"].ToString(); 
          or1.Parameters.Add("PDPART11", OracleType.NVarChar).Value = dwData["PDPART11"].ToString(); 
          or1.Parameters.Add("PDWERT11", OracleType.NVarChar).Value = dwData["PDWERT11"].ToString(); 
          or1.Parameters.Add("PDPART12", OracleType.NVarChar).Value = dwData["PDPART12"].ToString(); 
          or1.Parameters.Add("PDWERT12", OracleType.NVarChar).Value = dwData["PDWERT12"].ToString(); 
          or1.Parameters.Add("PDPART13", OracleType.NVarChar).Value = dwData["PDPART13"].ToString(); 
          or1.Parameters.Add("PDWERT13", OracleType.NVarChar).Value = dwData["PDWERT13"].ToString(); 
          or1.Parameters.Add("PDPART14", OracleType.NVarChar).Value = dwData["PDPART14"].ToString(); 
          or1.Parameters.Add("PDWERT14", OracleType.NVarChar).Value = dwData["PDWERT14"].ToString(); 
          or1.Parameters.Add("PDPART15", OracleType.NVarChar).Value = dwData["PDPART15"].ToString(); 
          or1.Parameters.Add("PDWERT15", OracleType.NVarChar).Value = dwData["PDWERT15"].ToString(); 
          or1.Parameters.Add("PDPART16", OracleType.NVarChar).Value = dwData["PDPART16"].ToString(); 
          or1.Parameters.Add("PDWERT16", OracleType.NVarChar).Value = dwData["PDWERT16"].ToString(); 
          or1.Parameters.Add("PDPART17", OracleType.NVarChar).Value = dwData["PDPART17"].ToString(); 
          or1.Parameters.Add("PDWERT17", OracleType.NVarChar).Value = dwData["PDWERT17"].ToString(); 
          or1.Parameters.Add("PDPART18", OracleType.NVarChar).Value = dwData["PDPART18"].ToString(); 
          or1.Parameters.Add("PDWERT18", OracleType.NVarChar).Value = dwData["PDWERT18"].ToString(); 
          or1.Parameters.Add("PDPART19", OracleType.NVarChar).Value = dwData["PDPART19"].ToString(); 
          or1.Parameters.Add("PDWERT19", OracleType.NVarChar).Value = dwData["PDWERT19"].ToString(); 
          or1.Parameters.Add("PDPART20", OracleType.NVarChar).Value = dwData["PDPART20"].ToString(); 
          or1.Parameters.Add("PDWERT20", OracleType.NVarChar).Value = dwData["PDWERT20"].ToString(); 
          or1.Parameters.Add("PDPART21", OracleType.NVarChar).Value = dwData["PDPART21"].ToString(); 
          or1.Parameters.Add("PDWERT21", OracleType.NVarChar).Value = dwData["PDWERT21"].ToString(); 
          or1.Parameters.Add("PDPART22", OracleType.NVarChar).Value = dwData["PDPART22"].ToString(); 
          or1.Parameters.Add("PDWERT22", OracleType.NVarChar).Value = dwData["PDWERT22"].ToString(); 
          or1.Parameters.Add("PDPART23", OracleType.NVarChar).Value = dwData["PDPART23"].ToString(); 
          or1.Parameters.Add("PDWERT23", OracleType.NVarChar).Value = dwData["PDWERT23"].ToString(); 
          or1.Parameters.Add("PDPART24", OracleType.NVarChar).Value = dwData["PDPART24"].ToString(); 
          or1.Parameters.Add("PDWERT24", OracleType.NVarChar).Value = dwData["PDWERT24"].ToString(); 
          or1.Parameters.Add("PDPART25", OracleType.NVarChar).Value = dwData["PDPART25"].ToString(); 
          or1.Parameters.Add("PDWERT25", OracleType.NVarChar).Value = dwData["PDWERT25"].ToString(); 
          or1.Parameters.Add("PDPART26", OracleType.NVarChar).Value = dwData["PDPART26"].ToString(); 
          or1.Parameters.Add("PDWERT26", OracleType.NVarChar).Value = dwData["PDWERT26"].ToString(); 
          or1.Parameters.Add("PDPART27", OracleType.NVarChar).Value = dwData["PDPART27"].ToString(); 
          or1.Parameters.Add("PDWERT27", OracleType.NVarChar).Value = dwData["PDWERT27"].ToString(); 
          or1.Parameters.Add("PDPART28", OracleType.NVarChar).Value = dwData["PDPART28"].ToString(); 
          or1.Parameters.Add("PDWERT28", OracleType.NVarChar).Value = dwData["PDWERT28"].ToString(); 
          or1.Parameters.Add("PDPART29", OracleType.NVarChar).Value = dwData["PDPART29"].ToString(); 
          or1.Parameters.Add("PDWERT29", OracleType.NVarChar).Value = dwData["PDWERT29"].ToString(); 
          or1.Parameters.Add("PDPART30", OracleType.NVarChar).Value = dwData["PDPART30"].ToString(); 
          or1.Parameters.Add("PDWERT30", OracleType.NVarChar).Value = dwData["PDWERT30"].ToString(); 
          or1.Parameters.Add("PDPART31", OracleType.NVarChar).Value = dwData["PDPART31"].ToString(); 
          or1.Parameters.Add("PDWERT31", OracleType.NVarChar).Value = dwData["PDWERT31"].ToString(); 
          or1.Parameters.Add("PDPART32", OracleType.NVarChar).Value = dwData["PDPART32"].ToString(); 
          or1.Parameters.Add("PDWERT32", OracleType.NVarChar).Value = dwData["PDWERT32"].ToString(); 
          or1.Parameters.Add("PDPART33", OracleType.NVarChar).Value = dwData["PDPART33"].ToString(); 
          or1.Parameters.Add("PDWERT33", OracleType.NVarChar).Value = dwData["PDWERT33"].ToString(); 
          or1.Parameters.Add("PDPART34", OracleType.NVarChar).Value = dwData["PDPART34"].ToString(); 
          or1.Parameters.Add("PDWERT34", OracleType.NVarChar).Value = dwData["PDWERT34"].ToString(); 
          or1.Parameters.Add("PDPART35", OracleType.NVarChar).Value = dwData["PDPART35"].ToString(); 
          or1.Parameters.Add("PDWERT35", OracleType.NVarChar).Value = dwData["PDWERT35"].ToString(); 
          or1.Parameters.Add("PDPART36", OracleType.NVarChar).Value = dwData["PDPART36"].ToString(); 
          or1.Parameters.Add("PDWERT36", OracleType.NVarChar).Value = dwData["PDWERT36"].ToString(); 
          or1.Parameters.Add("PDPART37", OracleType.NVarChar).Value = dwData["PDPART37"].ToString(); 
          or1.Parameters.Add("PDWERT37", OracleType.NVarChar).Value = dwData["PDWERT37"].ToString(); 
          or1.Parameters.Add("PDPART38", OracleType.NVarChar).Value = dwData["PDPART38"].ToString(); 
          or1.Parameters.Add("PDWERT38", OracleType.NVarChar).Value = dwData["PDWERT38"].ToString(); 
          or1.Parameters.Add("PDPART39", OracleType.NVarChar).Value = dwData["PDPART39"].ToString(); 
          or1.Parameters.Add("PDWERT39", OracleType.NVarChar).Value = dwData["PDWERT39"].ToString(); 
          or1.Parameters.Add("PDPART40", OracleType.NVarChar).Value = dwData["PDPART40"].ToString(); 
          or1.Parameters.Add("PDWERT40", OracleType.NVarChar).Value = dwData["PDWERT40"].ToString(); 
          or1.Parameters.Add("PDFILLER", OracleType.NVarChar).Value = dwData["PDFILLER"].ToString(); 
                    #endregion
                    break; 
                default:
                    break;
            }


            Connect2Proxy(or1);
        }
    }
}
